#pragma once
#include "util.hpp"
#include "level.hpp"
#include <thread>
namespace Log
{
    class LogMsg
    {
    public:
        size_t _ctime;          // 时间
        size_t _line;           // 行号
        std::thread::id _tid;   // 线程ID
        std::string _file;      // 文件名
        std::string _name;      // 日志器名称
        std::string _payload;   // 日志消息
        LogLevel::value _level; // 日志等级

    public:
        LogMsg(size_t line, std::string file, std::string name, std::string payload, LogLevel::value level)
            : _ctime(util::date::now()),
              _line(line),
              _tid(std::this_thread::get_id()),
              _file(file),
              _name(name),
              _payload(payload),
              _level(level)
        {
        }

    };
}